map

inline fun <R> map(transform: (T) -> R): Option<R>

Maps value of a Some using transform or returns the same None.

Return

Some with a value mapped using transform or this object if this is a None.

Parameters

transform

Function transforming value of a Some.